package indzcraft.loader;

public class Weapon implements Cloneable {
	
	public double dps;
	public double speed;
	public String type = "";
	private String enchant = "";
	
	public Weapon(double speed, double dps, String type, String enchant)
	{
		this.speed = speed;
		this.dps = dps;
		this.type = type;
		this.enchant = enchant;
	}
	
	public double get_normalized_speed(){
		if(type.equals("dagger"))
			return 1.7;
		else
			return 2.4;
	}
	
	public boolean hasEnchant(String name){
		if(this.enchant.equals(name))
			return true;
		return false;
	}
	
	public Weapon clone()
	{
		Object theClone = null;
		try {
			theClone = super.clone();
		}
		catch(CloneNotSupportedException e) {}
		
		return (Weapon)theClone;
	}

	public String getEnchant() {
		return enchant;
	}
}
